package cn.fjsay.java.demo4;

public class ShapeTest {
    public static void execute(Shape[] shapes){
        for (int i=0;i<shapes.length;i++){
            shapes[i].draw();
        }
    }

    public static void main(String[] args) {
        Shape[] shapes = new Shape[3];
        shapes[0] = new Circle();
        shapes[1] = new Square();
        shapes[2] = new Triangle();

        execute(shapes);

    }
}
